
package hk.ces.oxfam.patch.db.result;

import java.util.List;
import java.util.Map;

/**
 *
 * @author ReutyCheng
 */
class AbstractAdvanceResult implements SQLResult
{
  private SQLResult baseResult;

  public AbstractAdvanceResult(SQLResult baseResult)
  {
    this.baseResult = baseResult;
  }

  public SQLResult getBaseResult()
  {
    return this.baseResult;
  }

  public String getSql()
  {
    return baseResult.getSql();
  }

  public Object[] getParams()
  {
    return baseResult.getParams();
  }

  public Map<String, String> getMetas()
  {
    return this.baseResult.getMetas();
  }

  public String[] getColumnNames()
  {
    return baseResult.getColumnNames();
  }

  public List<Object[]> getRows()
  {
    return baseResult.getRows();
  }

  public int getColumnCount()
  {
    return baseResult.getColumnCount();
  }

  public int getRowCount()
  {
    return baseResult.getRowCount();
  }

  public boolean isRowsEmpty()
  {
    return baseResult.isRowsEmpty();
  }

  public <T> T getColumnValue(int columnIndex, int rowIndex, Class<T> clazz)
  {
    return baseResult.getColumnValue(columnIndex, rowIndex, clazz);
  }

  public <T> T getColumnValue(String columnName, int rowIndex, Class<T> clazz)
  {
    return baseResult.getColumnValue(columnName, rowIndex, clazz);
  }

  public <T> T[] getColumnValues(int columnIndex, T[] array)
  {
    return baseResult.getColumnValues(columnIndex, array);
  }

  public <T> T[] getColumnValues(String columnName, T[] array)
  {
    return baseResult.getColumnValues(columnName, array);
  }

  public int getColumnIndex(String columnName)
  {
    return baseResult.getColumnIndex(columnName);
  }
}
